[PHP Array] - how to save a few lines for matching a long list of characters

Posted by kwokwai on Stack Overflow See other posts from Stack Overflow or by kwokwai
Published on 2010-04-29T04:23:39Z Indexed on 2010/04/29 4:27 UTC
Read the original article Hit count: 290

Filed under:

Hi all,

I got a question when I was doing some Array in PHP. I don't know how to write the code for the following case:

$arrs = array("abc", "cr", "exd", "hello", "gj", "hwa", "@", "8");

foreach ($arrs as $arr){
// if $arr does not belong to any characters from a to z, 
// then there must be some special character in it.
}

Could you help me please?

© Stack Overflow or respective owner

Related posts about php5